package com.skyinno.mrms.common.service;

import java.util.Collection;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.web.multipart.MultipartFile;

import com.skyinno.mrms.common.model.FileModel;
import com.skyinno.mrms.common.model.PageModel;

public interface BaseService {

	
	void resetStart(PageModel model);
	
	Map<String, Object> setGridData(int total, Collection<?> rows);
	
	void setOrder(DetachedCriteria criteria, PageModel model);
	
	String crypt(String str) throws Exception;
	
	String saveFile(MultipartFile file, String dir, String type)
            throws Exception;
	
	String getIpAddr(HttpServletRequest request);
	
	String getLoginUser(HttpServletRequest request);
	
	FileModel fileEx(String id);
}
